<@t.extend file="/template/4.ftl">

	<@t.block name="content">
<script language="JavaScript">
<!--
function checkform(goods_id,val,num,rec_id){
	if(val != num) {
		var unique_goods_list_js = new Array();
				
		if(typeof(unique_goods_list_js[goods_id]) !='undefined'){
			if(val>1)alert('本活动每人仅限购买1瓶该商品');		
			document.getElementById(rec_id).value=1;		
		}
		formCart.submit();
	}
}
function update_cart(obj1,num,rec_id,goods_id){
	if(num==1){
		var unique_goods_list_js = new Array();				
		if(typeof(unique_goods_list_js[goods_id]) !='undefined'){
			alert('本活动每人仅限购买1瓶该商品');		
			obj1.value = 1;
			document.getElementById("formCart").submit();
			return;			
		}
	}
	if(obj1.value == 1 && num == -1){
		if(confirm('您确实要删除该商品吗？')) {
			location.href='dropGoods?id=' + rec_id; 
		}
	} else {
		obj1.value=parseInt(obj1.value)+parseInt(num);
		document.getElementById("formCart").action = "updateQuantity";
		document.getElementById("formCart").submit();
	}
}	
//-->
</script>
		<#assign preferenceAPI = variableMacroHelper.preferenceAPI />
		<div>
			<h3 id="urHere">当前位置: <a href="${currentSite.schemaName}">首页</a> <code>&gt;</code> 购物流程</h3>
			<div class="step s1"></div>
		</div>
		<div class="bottomheadb">
			<div id="list_top_car">
			<img height="15" src="${currentSite.schemaName}/skins/yecare/images/blank.gif">
			<div id="list_line_car">
				<div class="in_car">
					<div class="car_nav">
					  <label class="set"><a><span>我挑选的商品</span></a></label>
					</div>
					<div id="list_incar_bge">
						<form id="formCart" action="checkOut" method="post" name="formCart">
						<ul class="cont">
							<li class="titbg">
								<label id="name">商品名称</label>
								<label id="pic">商品图片</label>
								<label id="buynum">市场价</label>
								<label id="buynum">本店价</label>
								<label id="buynum">小计</label>
								<label id="buynum">购买数量</label>
								<label id="buynum">操作</label>
							</li>
							<#if Session["ORDER_IN_SESSION"]?? && (Session["ORDER_IN_SESSION"].orderItemList?size > 0)>
							<#assign cart = Session["ORDER_IN_SESSION"] />
							<#list Session["ORDER_IN_SESSION"].orderItemList as item>
							<li class="goods">
								<label id="name">
									<a target="_blank" href="${currentSite.schemaName}/shop/item?inode=${item.contentletInode}">${item.title}</a><br>                   
								</label>
								<label id="pic">
									<img width="50" height="50" class="imgb" src="${preferenceAPI.webAppImgHttpBasePath?default("")}${item.filePath}">
								</label>
								<label id="buynum">￥${item.listPrice}</label>
								<label id="buynum">￥${item.price}</label>
								<label id="buynum">￥${item.totalPrice}</label>
								<label id="buynum">
								<input type="text" onblur="checkform(227,this.value,1,'goods_number_${item.contentletInode}')" class="textInput" id="goods_number_${item.contentletInode}" size="6" value="${item.quantity}" name="goods_number[${item.contentletInode}]"><br>
								<a onclick="update_cart(document.getElementById('goods_number_${item.contentletInode}'),1,${item.contentletInode},227)" href="javascript:;"><img src="${currentSite.schemaName}/skins/yecare/images/top.gif">
								</a> 
								<a onclick="update_cart(document.getElementById('goods_number_${item.contentletInode}'),-1,${item.contentletInode})" href="javascript:;">
									<img src="${currentSite.schemaName}/skins/yecare/images/down.gif">
								</a>
								</label>
								<label class="topheadd" id="buynum"></label>
								<p class="menu_hui">
									<a href="javascript:if(confirm('您确实要把该商品移出购物车吗？'))location.href='dropGoods?id=${item.contentletInode}';">
									<span>删除</span></a>
								</p>
							</li>
							</#list>
							<li class="tongji">
								<label style="width: 64%;" class="l">购物金额小计 ￥${cart.orderTotalPrice}<br>
								比市场价 ￥${cart.orderTotalMarketPrice} 节省了 ￥${cart.orderSavingsPrice} (${cart.orderSavingsDiscount})</label>
								<label style="width: 36%;" class="r">
								<span style="padding-top: 10px;" class="l left_div">
									<a class="LV" href="${currentSite.schemaName}">
										<img align="absmiddle" src="${currentSite.schemaName}/skins/yecare/images/icon_jxbuy.gif" />继续购
									</a>
								</span>
								<!--
								<span style="padding-top: 10px;" class="l left_div">
								<a class="LV" onclick="formCart.submit();" href="#">
									<img align="absmiddle" src="${currentSite.schemaName}/skins/yecare/images/icon_sxcar.gif">更新购物车</a>
								</span>
								-->
								<span class="l left_div"><a class="butpay" href="checkOut">
									<img align="absmiddle" src="${currentSite.schemaName}/skins/yecare/images/but_pay.gif"></a>
								</span>
								</label>
							</li>
							</#if>
						</ul>
						</form>
					</div>
				</div>
			</div>

			<div id="list_down_car"><img height="15" src="${currentSite.schemaName}/skins/yecare/images/blank.gif"></div>
		</div>
		<div class="bottomhead">
		</div>
		<div class="bottomheadb">
		</div>

	</@t.block>

</@t.extend>